Backend   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 4

4 Functions

Rating   Name   Duplication   Size   Complexity  
A init 0 1 1
A registerSecurityHandler 0 6 1
A constructor 0 4 1
A register 0 6 1
1
export default class Backend {
2
    constructor() {
3
        this.routes = [];
4
        this.security = [];
5
    }
6
7
    register(operationId, handler) {
8
        this.routes.push({
9
            operationId,
10
            handler,
11
        });
12
    }
13
14
    registerSecurityHandler(name, handler) {
15
        this.security.push({
16
            name,
17
            handler,
18
        });
19
    }
20
21
    init() {}
22
}
23